package com.ibeetl.code.ch01.sample;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/** @author frankwoo */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Area {
  private Integer provinceId;
  private Integer cityId;
  private Integer townId;

  public Area(Integer provinceId, Integer cityId) {
    this.provinceId = provinceId;
    this.cityId = cityId;
  }

  public CityKey buildKey() {
    return new CityKey(provinceId, cityId);
  }
}
